//import _ from 'lodash';
import obj from './a.js'
import './style.css';
import Icon from './star.png';
import Img from './page4-img5.jpg'
import printMe from './print.js';

function component() {

    obj.test();

    const element = document.createElement('div');
    const btn = document.createElement('button');
    // lodash（目前通过一个 script 引入）对于执行这一行是必需的
    // element.innerHTML = _.join(['Hello', 'webpack'], ' ');
    element.innerHTML="但愿深沉的内疚永远的纠结在你的心底,愿你的这个世界上心灵永远不的安宁";
    element.classList.add('hello');
    const myIcon = new Image();
    myIcon.src = Icon;
   element.appendChild(myIcon);
   const  imgElement =document.createElement("img");
   imgElement.src=Img;

   btn.innerHTML = 'Click me and check the console!';
   btn.onclick = printMe;
 
   element.appendChild(btn);

   element.appendChild(imgElement);
    return element;
  }
  
  document.body.appendChild(component());